package Work;

public class Test10 {
    public static void main(String[] args) {
        int[] array = {2,4,9};
        System.out.println(avg(array));
    }

    public static double avg(int[] array) {
        int sum = 0;
        for (int i = 0; i < array.length; i++) {
            sum+=array[i];
        }
        return sum/array.length;
    }
}
